<!--
  * 预警
-->
<template>
  <a-card size="small" :bordered="false" :hoverable="true">
    <a-tabs v-model:activeKey="activeKey">
      <a-tab-pane :key="item.value" :tab="`${item.desc}预警`" v-for="item in tabList">
        <component :is="warningComponents[item.value as string]" v-if="activeKey === item.value" :key="item.value" />
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>
<script setup lang="ts">
import { warningComponents } from './components'
import { useEnums } from '@/hooks/plugins/useEnums'
const { getValueDescList } = useEnums()

const tabList = reactive(getValueDescList('WARNING_TYPE_ENUM'))
const activeKey = ref<string>(tabList[0].value as string)
</script>
